<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
    <!-- 包含公共的JSP代码片段 -->
    <title>无线点餐平台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="<%=request.getContextPath()%>/style/js/jquery.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/style/js/page_common.js"></script>
    <link href="<%=request.getContextPath()%>/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/style/css/index_1.css"/>
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
    <div id="TitleArea_Head"></div>
    <div id="TitleArea_Title">
        <div id="TitleArea_Title_Content">
            <img border="0" width="13" height="13"
                 src="style/images/title_arrow.gif"/> 餐厅订单列表
        </div>
    </div>
    <div id="TitleArea_End"></div>
</div>

<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
        <tr align="center" valign="middle" id="TableTitle">
            <td>订单编号</td>
            <td>餐桌名</td>
            <td>下单日期</td>
            <td>总金额</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
        </thead>
        <!--显示数据列表 -->
        <tbody id="TableData">
        <c:forEach items="${requestScope.bills}" var="bill">
            <tr height="60">
                <td>${bill.id}</td>
                <td>${bill.tableId}</td>
                <td><fmt:formatDate value="${bill.createDate}" pattern="yyyy-MM-dd HH:mm"/> </td>
                <td>${bill.amount}</td>
                <td>${bill.status eq 1?'未结账':'已结账'}
                </td>
                <td>
                    <a href="orderDetail.html" class="FunctionButton">详细</a>
                    <a href="order.html?act=pay&id=${bill.id}" class="FunctionButton">结账</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <!-- 其他功能超链接 -->
    <div id="TableTail" align="center">
    </div>
</div>
</body>
</html>
